/*
 * @Author: nengwu 409791297@qq.com
 * @Date: 2020-06-25 22:27:36
 * @LastEditors: mylesshie@gmail.com
 * @LastEditTime: 2020-09-09 22:53:29
 * @description:
 */

import { Icon } from 'native-base'
import React from 'react'
import { View, Text, Image } from 'react-native'
import AntDesign from 'react-native-vector-icons/AntDesign'
import MaterialIcons from 'react-native-vector-icons/MaterialIcons'

import Feather from 'react-native-vector-icons/Feather'
// import Icon from 'react-native-vector-icons/Icon'
const defaultColor = '#505050'
const activeColor = '#D2363A'
const banenrIcon = require('@/assets/images/life/banner.png')

const TabIcon = props => {
  switch (props.name) {
    case 'Home':

      return (
        <View>

          <AntDesign
            name="home"
            color={props.focused ? activeColor : defaultColor}
            size={25}
          />
        </View>
      )
    // const icon = props.focused
    //   ? require('../../../src/assets/images/tab/icon_home_sel.png')
    //   : require('../../../src/assets/images/tab/icon_home_nol.png');

    // return <Image source={icon} style={{ height: 25, width: 25 }} />;
    case 'Prediction':

      // const icon1 = props.focused
      //   ? require('../../../src/assets/images/tab/icon_ward_sel.png')
      //   : require('../../../src/assets/images/tab/icon_ward_nol.png');

      // return <Image source={icon1} style={{ height: 25, width: 25 }} />;
      return (
        <View>

          <Feather
            name="flag"

            color={props.focused ? activeColor : defaultColor}
            size={25}
          />

        </View>
      )
    case 'Live':
      // const icon2 = props.focused
      //   ? require('../../../src/assets/images/tab/icon_live_sel.png')
      //   : require('../../../src/assets/images/tab/icon_live_nol.png');

      // return <Image source={icon2} style={{ height: 25, width: 25 }} />;
      return (
        <View>
          <MaterialIcons
            name="live-tv"
            color={props.focused ? activeColor : defaultColor}
            size={25}
          />
        </View>
      )
    case 'UserCenter':
      // const icon3 = props.focused
      //   ? require('../../../src/assets/images/tab/icon_mine_sel.png')
      //   : require('../../../src/assets/images/tab/icon_mine_nol.png');

      // return <Image source={icon3} style={{ height: 25, width: 25 }} />;
      return (
        <View>
          <AntDesign
            name="user"
            color={props.focused ? activeColor : defaultColor}
            size={25}
          />
        </View>
      )
    case 'LifeRoom':
      // const icon4 = props.focused
      //   ? require('../../../src/assets/images/tab/icon_service_sel.png')
      //   : require('../../../src/assets/images/tab/icon_service_nol.png');

      // return <Image source={icon4} style={{ height: 25, width: 25 }} />;
      return (
        <View>
          <AntDesign
            name="sharealt"
            color={props.focused ? activeColor : defaultColor}
            size={25}
          />
        </View>
      )
    default:
      // const icon5 = props.focused
      //   ? require('../../../src/assets/images/tab/icon_home_sel.png')
      //   : require('../../../src/assets/images/tab/icon_home_nol.png');

      // return <Image source={icon5} style={{ height: 25, width: 25 }} />;
      return (
        <View>
          <AntDesign
            name="home"
            color={props.focused ? activeColor : defaultColor}
            size={40}
          />

        </View>
      )
  }
}

export default TabIcon
